<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>委托管理</title>
    <link  href="../.././css/accountManage.css" rel="stylesheet" type="text/css"/>
    <link href="../.././css/font-awesome.css" rel="stylesheet"/>
    <link  href="../.././css/common.css" rel="stylesheet" />
    <script type="text/javascript" src="../.././js/jquery-1.10.1.min.js"></script>
    <script type="text/javascript" src="../.././js/google-maps.js"></script>
    <script>$(document).ready(function(){$(".vertical-nav").verticalnav({speed: 400,align: "left"});});</script>
</head>
<body>
<div id="Container">
    <div id="Header">
        <center><h1>股票交易系统前台资金用户界面</h1></center>
    </div>
    <div id="Content">
        <div id="Content-Left">
            <ul class="vertical-nav dark red">
                <li class="active"><a href=".././index.html"><i class="icon-home"></i>首页</a></li>
                <li><a href="  "><i class="icon-cogs"></i>委托管理
                    <span class="submenu-icon"></span></a>
                    <ul>
                        <li><a href="./deligationNew.html">创建新的委托</a></li>
                        <li><a href="./deligationOrderQueryOrCancle.html ">查询或撤消委托订单</a></li>
                        <li><a href="./deligationAllOrder.html ">获得所有成交订单</a></li>
                        <li><a href="./getAlldeligation.html ">获得委托信息</a></li>
                    </ul>
                </li>
                <li><a href=" "><i class="icon-briefcase"></i>资金账户管理
                    <span class="submenu-icon"></span></a>
                    <ul>
                        <li><a href="./getMyfundflow.html">查询指定资金账户的资金流动</a></li>
                        <li><a href="./getMyAllstock.html">查询指定资金账户的所有用户持仓</a></li>
                        <li><a href="./getMyAccountInfo.html">获得用户资金信息</a></li>
                        <li><a href="./mybondManage.html">自选股管理</a></li>
                    </ul>
                </li>
                <li><a href="  "><i class="icon-user"></i>关于我们</a></li>
                <li><a href="  "><i class="icon-envelope"></i>联系我们</a></li>
            </ul>
        </div>
        <div id="Content-Right">
            <div  id="toolbar" class="toolbar">
                <h2 class="title">创建新的委托</h2>
            </div>
            <!-- 数据修改面板-->
            <div  id="editPanel" style="overflow-x: hidden;margin: 0;padding:0;" >
                <form  id="dnew_select_form">
                    <table class="edittable" style="width:900px">
                        <tr style="height:0px;border: 0px;">
                            <td class="right" style="width:130px;border: 0px;"></td>
                            <td class="left" style="width:310px;border: 0px;"></td>
                            <td class="right" style="width:130px;border: 0px;"></td>
                            <td class="left" style="border: 0px;"></td>
                        </tr>
                            <tr>
                            <td class="right" style="width:130px;border-top: 0px;">资金账户ID：</td>
                            <td class="left" style="border-top: 0px;height: 40px;line-height: 40px;">
                                <input type="text" id="cAaccountId"  name="cAaccountId" class="input" maxlength="18" placeholder="请输入资金账户ID" watermark="请输入资金账户ID" />
                            </td>
                        </tr>
                        <tr>
                            <td class="right" style="width: 100px">证券代码：</td>
                            <td class="left" style="width:100px">
                                <input type="text" id="securityId" name="securityId" class="input"maxlength="18"  placeholder="请输入证券代码" watermark="请输入证券代码" />
                            </td>
                        </tr>
                        <tr>
                            <td class="right" style="width:100px">证券名称：</td>
                            <td class="left" style="width:100px"><input type="text" id="securityName" name="securityName" class="input"maxlength="18"  placeholder="请输入证券名称" watermark="请输入证券名称" /></td>
                        </tr>
                        <tr>
                            <td class="right" style="width:100px">操作方向：</td>
                            <td class="left" style="width:100px"><input type="text" id="delegationDirection" name="delegationDirection" class="input"maxlength="18"  placeholder="请设置操作方向" watermark="请设置操作方向" /></td>
                        </tr>
                        <tr>
                            <td class="right" style="width:100px">申请数量：</td>
                            <td class="left" style="width:100px"><input type="text" id="delegationNum" name="delegationNum" class="input"maxlength="18"  placeholder="请设置申请数量" watermark="请设置申请数量" /></td>
                        </tr>
						
						  <tr>
                            <td class="right" style="width:100px">申请价格：</td>
                            <td class="left" style="width:100px"><input type="text" id="delegationPrice" name="delegationPrice" class="input"maxlength="18"  placeholder="请设置申请价格" watermark="请设置申请价格" /></td>
                        </tr>
						 <tr>
                            <td class="right" style="width:100px">市场均价：</td>
                            <td class="left" style="width:100px"><input type="text" id="evenPrice" name="evenPrice" class="input"maxlength="18"  placeholder="请设置市场均价" watermark="请设置市场均价" /></td>
                        </tr>
						 <tr>
                            <td class="right" style="width:100px">交易市场：</td>
                            <td class="left" style="width:100px"><input type="text" id="tradingMarket" name="tradingMarket" class="input"maxlength="18"  placeholder="请设置交易市场" watermark="请设置交易市场" /></td>
                        </tr>
						 <tr>
                            <td class="right" style="width:100px">货币种类：</td>
                            <td class="left" style="width:100px"><input type="text" id="currency" name="currency" class="input"maxlength="18"  placeholder="请设置货币种类" watermark="请设置货币种类" /></td>
                        </tr>
						
						
                        <tr>
                            <td class="left" colspan="2" style="width: 100px">
                                <input type="button"  value="创建" onclick="deligCreate()"/>
                                <input type="reset"  value="重置"/>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
            <!--数据查询显示区-->
            <div id="querylist">
                
            </div>
        </div>
    </div>
    <div id="Footer"> <p></font>COPYRIGHT2017-2017 &copy;<BR></font></p></div>
</div>
</body>
</html>
<script type="text/javascript">
    function deligCreate(){
        var data = $("#dnew_select_form").serialize();
        $.param(data);
        $.ajax({
            url: "../../delegation",
            type: "POST",
            data: data,
            // processData:false,
            contentType: "application/x-www-form-urlencoded; charset=utf-8",
            dataType: "json",
            success: function (result) {
                //var obj=eval("("+result+")");
                //或者$.parsejson(data);
                var obj=result.object;
                if (result.code == 0) {
                    alert(result.message);
                    alert("委托单号为"+obj.delegationId);
                } else if (result.code == 1) {
                    alert(result.message);
                }
            },
            error: function () {
                alert("委托生成失败！");
            }
        });
    }
</script>


